<extend name="Public/base"/>
<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>预听列表</h2>
        <br>&nbsp;&nbsp;<h4>参加预听总人数：{$total}</h4>
    </div>
    <div class="data-table table-striped">
    <table class="">
    <thead>
        <tr>
        <th class="">序号</th>
        <th class="">学生姓名</th>
        <th class="">联系电话</th>
        <th class="">预听时间</th>
        </tr>
    </thead>
    <tbody >
        <volist name="todayRows" id="vo">
        <tr style="background-color:#E0FFE0">
            <td>{$i}</td>
            <td>{$vo.fullname}</td>
            <td>{$vo.telephone}</td>
            <td>{$vo.trial_time}</td>
        </tr> 
        </volist>
    </tbody>
     
    <tbody>
        <volist name="_datalist" id="vo" key='n'>
        <tr>
            <td>{$i+$n}</td>
            <td>{$vo.fullname}</td>
            <td>{$vo.telephone}</td>
            <td>{$vo.trial_time}</td>
        </tr> 
        </volist>
        </tbody>
    </table> 
    </div>
    <div class="page">
        {$_page}
    </div>
    <!-- 数据列表 -->
    <if condition="$_datalist eq false" >
    <div style="padding: 20px;text-align: center;border: 1px solid #ccc; border-radius: 8px;">
        暂无数据
    </div>
    </if>
     
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
<link href="/Public/static/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="/Public/static/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css"><link href="/Public/static/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/Public/static/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="/Public/static/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

<script type="text/javascript" src="/Public/static/ajaxfileupload.js" charset="UTF-8"></script>

    <script type="text/javascript">
        // Think.setValue("type", {$info.type|default=0});
        // Think.setValue("group", {$info.group|default=0});
        //导航高亮
        $('.side-sub-menu').find('a[href="{:U('User/index')}"]').closest('li').addClass('current');

        $(document).on("change",".is_effective",function(){
                _self = this;
                if (_self.value==0) {
                    $(".invalid_memo").show();
                } else {
                    $(".invalid_memo").hide();
                }
            })

        function jAccessSave() {
            _visit_conter = $("#visit_conter").val();
            if (_visit_conter=='') {
                alert("回访内容不能为空");
                return false;
            }
          
            if ($("#is_trial").prop('checked') && $("#visit_next_time").val()=='' ) {
                alert("试听时间不能为空");
                return false;
            }
            _frm = $("#accessFrm");
 
            $.post(_frm.attr("action"),_frm.serialize(),function(res){
 
                _obj = eval("("+res+")");
                if (_obj.status=='success') {
                    alert("提交成功");
                 
                    
                        setTimeout(function(){
                           location=location ;
                        },500);

                    
                }
            })
            return false;
        } 

        $('#visit_next_time').datetimepicker({
            format: 'yyyy-mm-dd',
            language:"zh-CN",
            minView:2,
            autoclose:true
        });

        $('#trial_time').datetimepicker({
            format: 'yyyy-mm-dd',
            language:"zh-CN",
            minView:2,
            autoclose:true
        });

        $(document).on("click","#is_trial",function() {
 
            if ($(this).prop('checked')) {
                $(".trial-time-wrap").show();
            } else {
                $(".trial-time-wrap").hide();
            }
        })
    </script>
</block>

 